<?php
$this->title = "Matched firends";
$this->headTitle($this->title);
$matched = $this->matched;
?>	
		
		<!-- start content -->
		<div id="search_inside" class="content">


				<?php if (empty($matched)){
							echo "There are not any users that matched you";
						}
						else{
							?>
						<table id="tbl_SearchResults">
						<tr>
							<th>Name</th>
							<th>Surname</th>
							<th>UserName</th>						    
						    <th>&nbsp;</th>
						    <th>&nbsp;</th>
						</tr>
						<?php 
						$session = Zend_Registry::get('session');							
						foreach($matched as $user){?>	
								<tr>						
									<td><?php echo $user["FirstName"];?></td>			
									<td><?php echo $user["LastName"];?></td>
									<td><?php echo $user["Username"];?></td>							
									<td><a href="<?php echo $this->url(array('controller'=>'Profile','action'=>'index'))."?id=". $user["id"] ?>">View profile</a></td>
									<td><a href="<?php echo $this->url(array('controller'=>'Friends','action'=>'sendrequest', 'sender'=>$session->user['id'], 'receiver'=>(int)$user["id"]))?>">Send request</a></td>
								<tr>					
								<?php }	
						}?>
						</table>	

			
		</div>
		<!-- end content -->			